package com.dhemery.mack.model.tests;


import static org.junit.Assert.*;

import org.junit.Test;

import com.dhemery.mack.model.Folder;
import com.dhemery.mack.model.Node;

public class NodeTests {

	@Test
	public void newNodeHasNullFolder() {
		assertNull(new Node("").getFolder());
	}

	@Test
	public void remembersSetFolder() {
		Node node = new Node("");
		Folder folder = new Folder();

		node.setFolder(folder);
		
		assertSame(folder, node.getFolder());
	}

	@Test
	public void hasAnnotationList() {
		assertNotNull(new Node("").getAnnotations());
	}

	@Test
	public void newNodeHasEmptyAnnotationList() {
		assertEquals(0, new Node("").getAnnotations().size());
	}

	@Test
	public void hasDetailList() {
		assertNotNull(new Node("").getDetails());
	}

	@Test
	public void newNodeHasEmptyDetailList() {
		assertEquals(0, new Node("").getDetails().size());
	}

	@Test
	public void hasTabList() {
		assertNotNull(new Node("").getTabs());
	}

	@Test
	public void newNodeHasEmptyTabList() {
		assertEquals(0, new Node("").getTabs().size());
	}
}
